package com.gwctv.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;

/**
 * 创建Emloyee实体类，其中成员变量对应employee表中各字段
 * @Data 相当于getter\setter方法
 * @Builder 使用builder模式构建对象
 * @NoArgsConstructor 相当于无参构造方法
 * @AllArgsConstructor 相当于全参构造方法
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Tag(name="员工实体类",description = "员工实体类对应于数据库表中各字段")
public class Employee {
    @Schema(name ="id",description="员工id",type = "Long")
    private Long id;

    @Schema(name="name",description="员工用户名",type="String")
    private String name;

    @Schema(name="username",description="员工名称",type="String")
    private String username;

    @Schema(name="password",description="员工密码",type = "String")
    private String password;

    @Schema(name="phone",description="员工手机号",type="String")
    private String phone;

    @Schema(name="sex",description="员工性别",type="String")
    private String sex;

    @Schema(name="idNumber",description="员工唯一代码",type="String")
    private String idNumber;

    @Schema(name="status",description="员工状态",type="integer")
    private Integer status;

    @Schema(name="createTime",description="注册时间",type="LocalDateTime")
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(name="updateTime",description="更新时间",type="LocalDateTime")
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(name="createUser",description="创建人",type="long")
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Long createUser;

    @Schema(name="updateUser",description="更新人",type="long")
    private Long updateUser;
}
